from neo4j import GraphDatabase

driver = GraphDatabase.driver(
    "bolt://localhost:7687",
    auth=("neo4j", "12345678"),
    encrypted=False,  # 设置是否加密
    max_connection_lifetime=3600,  # 设置连接的最长存活时间
    max_connection_pool_size=10,  # 最大连接数
)

cypher = "MATCH (p:Person) where p.age >$age RETURN p.name,p.age"
params = {"age": 10}
# 创建节点
with driver.session() as session:
    result = session.run(cypher, params)
    print(list(result))
driver.close()
